import { SitemapGenerator } from '../src/utils/SitemapGenerator'
import dotenv from 'dotenv'

// 加载环境变量
dotenv.config()

async function main() {
  try {
    const domain = process.env.VITE_APP_DOMAIN || 'https://your-domain.com'
    const generator = new SitemapGenerator(domain)
    
    await generator.generate()
    console.log('Successfully generated sitemap.xml and robots.txt')
  } catch (error) {
    console.error('Error generating sitemap:', error)
    process.exit(1)
  }
}

main() 